<div class="modal-header" style="padding-top:32px">
    <button type="button" class="close" ng-click="cancle()"  aria-hidden="true"></button>
    <h4 class="modal-title">
        <div class="caption">
            <i class=" icon-layers font-red"></i>
            <span class="caption-subject font-red sbold uppercase">{{title}}</span>
        </div>
    </h4>
</div>
<div class="modal-body">
    <form class="form-validation form-horizontal" method="post" name="form" novalidate>
        <div class="row">
            <div class="col-md-12">
                <div class="form-body">
                    <div class="form-group ">
                        <div class="col-md-6 form-group form-md-line-input " >
                            <label class="col-md-4 control-label" >姓名<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="text" class="form-control" placeholder="" maxlength="20" name="name" ng-model="customer.name" required >
                                    <p ng-show="userForm.username.$error.maxLength" class="help-block">用户太长.</p>
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="col-md-6 form-group form-md-line-input">
                            <label class="col-md-4 control-label " >别名</label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="text" class="form-control" maxlength="20" ng-model="customer.alias">
                                </div>
                                <span class="help-block">输入字符不能超过20位！</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group ">
                        <div class="col-md-6 form-group form-md-line-input " >
                            <label class="col-md-4 control-label" >手机号码<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="text" class="form-control" maxlength="11" ng-pattern="/^[0-9]+$/" ng-model="customer.mobile" placeholder="" required number="true" name="mobile">
                                </div>
                                <span class="help-block">请输入11位数的手机号码！</span>
                            </div>
                        </div>
                        <div class="col-md-6 form-group form-md-line-input">
                            <label class="col-md-4 control-label" >微信号</label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="text" class="form-control" maxlength="20" ng-model="customer.wxNo" placeholder="" name="wxNo">
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group ">
                        <div class="col-md-6 form-group form-md-line-input">
                            <label class="col-md-4 control-label" >身份证号</label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="text" class="form-control" placeholder="" maxlength="20" ng-model="customer.idCardNo" name="idCardNo">
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="col-md-6 form-group form-md-line-input">
                            <label class="col-md-4 control-label" >邮箱</label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="email" class="form-control" maxlength="20" ng-model="customer.email" placeholder="" name="email">
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group ">
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >消费习惯地域<span class="required">*</span></label>
                            <div class="col-md-8">
                                <ui-select allow-clear ng-model="customer.regcode" theme="bootstrap">
                                    <ui-select-match placeholder="请选择..." class="">{{$select.selected.value.name}}</ui-select-match>
                                    <ui-select-choices repeat="item.key as (key, item)  in areas | filter: { value: { name: $select.search }}">
                                        <span ng-bind-html="item.value.name | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >持卡人等级<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="text" class="form-control" ng-model="customer.level" required value="0" name="level">
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-6 form-group form-md-line-input">
                            <label class="col-md-4 control-label" >归属人</label>
                            <div class="col-md-8">
                                <ui-select allow-clear ng-model="customer.agentId" theme="bootstrap">
                                    <ui-select-match placeholder="请选择..." class="">{{$select.selected.value.name}}</ui-select-match>
                                    <ui-select-choices repeat="item.key as (key, item)  in agents | filter: { value: { name: $select.search }}">
                                        <span ng-bind-html="item.value.name | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >还款操作员<span class="required">*</span></label>
                            <div class="col-md-8">
                                <ui-select allow-clear ng-model="customer.defaultOperId" theme="bootstrap">
                                    <ui-select-match placeholder="请选择..." class="">{{$select.selected.value.name}}</ui-select-match>
                                    <ui-select-choices repeat="item.key as (key, item)  in tenantList | filter: { value: { name: $select.search }}">
                                        <span ng-bind-html="item.value.name | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >代还利率<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <input type="text" class="form-control" placeholder="" ng-model="customer.returnRate" required name="returnRate">
                                </div>
                                <span class="help-block">代还利率 e.g: 1.5</span>
                            </div>
                        </div>
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >单笔还款比例<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <select class="form-control" uix-select="repaymentRate" ng-model="customer.repaymentRate" required></select>
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >是否VIP<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <select class="form-control has-error" ng-model="customer.vip" required>
                                        <option value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >状态<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <select class="form-control has-error"  ng-model="customer.status" required>
                                        <option value="1">有效</option>
                                        <option value="0">无效</option>
                                    </select>
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-6 form-group form-md-line-input ">
                            <label class="col-md-4 control-label" >是否内部<span class="required">*</span></label>
                            <div class="col-md-8">
                                <div class="input-icon right">
                                    <select class="form-control has-error" ng-model="customer.isemployee" required>
                                        <option value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                </div>
                                <span class="help-block"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group form-md-line-input">
                        <label class="col-md-2 control-label" >家庭地址</label>
                        <div class="col-md-10">
                            <div class="input-icon right">
                                <input type="text" class="form-control" ng-model="customer.address1" placeholder="" name="address1">
                            </div>
                            <span class="help-block"></span>
                        </div>
                    </div>
                    <div class="form-group form-md-line-input">
                        <label class="col-md-2 control-label" >常用地址</label>
                        <div class="col-md-10">
                            <div class="input-icon right">
                                <input type="text" class="form-control" ng-model="customer.address2" placeholder="" name="address2">
                            </div>
                            <span class="help-block"></span>
                        </div>
                    </div>

                    <div class="form-group form-md-line-input">
                        <label class="col-md-2 control-label" >备注</label>
                        <div class="col-md-10">
                            <div class="input-icon right">
                                <textarea class="form-control" rows="3" ng-model="customer.remarks"></textarea>
                            </div>
                            <span class="help-block"></span>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button type="button" class="btn default" data-dismiss="modal" ng-click="cancle()">关闭</button>
    <button type="submit" class="btn blue" ng-click="ok(form.$valid)" ng-disabled="form.$invalid">保存</button>
</div>